
import { Button } from 'antd';
import React from 'react'
import NewsPublish from '../../../components/publish-manage/NewsPublish';
import usePublish from '../../../components/publish-manage/usePublish';

export default function Unpublished() {
    // 待发布
    const { dataSource, handlePublish } = usePublish(1)
    return (
        <div>
            <NewsPublish dataSource={dataSource}
                // 通过NewsPublish组件接受当前id并传递给发布函数
                button={(id) => {
                    return <Button type="primary" onClick={() => handlePublish(id)}>发布</Button>
                }
                }></NewsPublish>
        </div>
    )
}
